package edu.sctu.nieyu.day20150628exam.deal;


/**
 * Created by user01 on 2015/6/28.
 */

import edu.sctu.nieyu.day20150628exam.data.GoodsMessage;
import edu.sctu.nieyu.day20150628exam.data.GoodsData;

/**
 * 商品价格判断及数量统计类
 */
public class GoodsCount {

    public static void getGoodsCount(GoodsData goodsData) {
        int count1 = 0;
        int count2 = 0;
        for (GoodsMessage good : goodsData.list) {
            if (Float.parseFloat(good.goods_price) > 100) {
                count1++;
            } else {
                count2++;
            }
        }
        System.out.println("商品价格大于100的数量有：" + count1);
        System.out.println("商品价格小于100的数量有：" + count2);
    }
}
